<script type="text/javascript">
function check_packet_form(){
	$("#frm_packet_new").submit();
}
$(document).ready(function(){
	$('#frm_packet_new').validate({
		rules: {
			packet_name:{
				required: true
			},
			packet_description:{
				required: true,
			},
			packet_image:{
				accept: "jpg|png|gif",
			},
			packet_download_items: {
        		required: true ,
        		number: true
        	},
        	packet_period: {
        		required: true ,
        		number: true
        	},
        	packet_price: {
        		required: true ,
        		number: true
        	}
        }, 
        messages: {
        	packet_name:{
        		required:"{TEXT.input_name_packet}!"
        	},
        	packet_description:{
        		required:"{TEXT.input_description_packet}!"
        	},
        	packet_image:{
        		accept:"{TEXT.input_choise_image_packet}!"
        	},
        	packet_download_items:{
        		required:"{TEXT.input_downloads_item_packet}!"
        	},
        	packet_period:{
        		required:"{TEXT.input_period_packet}!"
        	},
        	packet_price:{
        		required:"{TEXT.input_price_packet}!"
        	}
        }
	 });
});
</script>
<div class="top_list_page"></div>
<form name="frmUpdate" id="frm_packet_new" action="" method="post" enctype="multipart/form-data">
  <input type="hidden" name="sAction" value="{action}" />
  <table class="adminform" >
    <tr>
      <th colspan="2" scope="col">&nbsp;<span class="require" id="ajax_loading2">&nbsp;</span></th>
    </tr>
    <tr>
      <td width="150">{PACKET.name}<span class="require">*</span> :</td>
      <td>
      	<input type="text" name="packet_name" id="packet_name" value="{row.name}" class="txtbox"/>
      </td>
    </tr>
    <tr>
      <td>{PACKET.description}<span class="require">*</span> :</td>
      <td>
      	<textarea name="packet_description" id="packet_description" class="txtbox">{row.description}</textarea>
      </td>
    </tr>
    <tr>
      <td width="200">{PACKET.image} *.jpg, *.png, *.gif: </td>
      <td>
      	<input type="file" name="packet_image" id="packet_image" class="txtbox" style="width: 280px;" size="30"/><br/>
      	<span>{row.image}</span>
      	<input type="hidden" name="packet_image_old" value="{row.image}"/>
      </td>
    </tr>
    <tr>
      <td>{PACKET.download_items}<span class="require">*</span> :</td>
      <td>
      	<input type="text" name="packet_download_items" name="packet_download_items" value="{row.download_items}" class="txtbox" />
      </td>
    </tr>
    <tr>
      <td>{PACKET.period}<span class="require">*</span> :</td>
      <td>
      	<input type="text" name="packet_period" name="packet_period" value="{row.period}" class="txtbox"/>
      </td>
    </tr>
    <tr>
      <td>{PACKET.price}<span class="require">*</span> :</td>
      <td>
      	<input type="text" name="packet_price" name="packet_price" value="{row.price}" class="txtbox"/>
      </td>
    </tr>
    <tr>
      <td>{PACKET.status} :</td>
      <td>
      	<select name="packet_status" name="packet_status">
      		<option value="1" {row.active}>active</option>
      		<option value="0" {row.unactive}>unactive</option>
      	</select>
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>
